<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
    />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta
      name="keywords"
      content="恒温红酒 bossstyle coolstyle livestyle style 莱支好酒"
    />
    <meta name="description" content="" />
    <meta name="author" content="coolstyle" />
    <title>共享智能恒温酒柜</title>
    <link
      rel="shortcut icon"
      href="{{ STATIC_URL }}/static/share/contents/membership/img/favicon.ico?v={{ version_code }}"
    />
    <link
      rel="stylesheet"
      href="{{ STATIC_URL }}/static/share/contents/membership/css/main.css?v={{ version_code }}"
    />
  </head>
  <body>
    <div class="abpos">
      <div class="u-arrow"></div>
      <div class="a-box">
        <a
          href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxab61789682188994&redirect_uri=https%3a%2f%2fwx.style999.com%2fmall%2fdetail%2f498716026622556&response_type=code&scope=snsapi_userinfo&state=mall#wechat_redirect"
          class="a-text"
        >
          <img
            src="{{ STATIC_URL }}/static/share/contents/membership/img/btn.png?v={{ version_code }}"
          />
        </a>
      </div>
    </div>
    <div class="wp" id="wp">
      <div id="wp-inner" class="wp-inner">
        <div class="page page1">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/1.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page2">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/2.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page3">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/3.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page4">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/4.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page5">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/5.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page6">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/6.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page7">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/7.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page8">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/8.jpg?v={{ version_code }}"
          />
        </div>
        <div class="page page9">
          <img
            class="bg"
            src="{{ STATIC_URL }}/static/share/contents/membership/img/9.jpg?v={{ version_code }}"
          />
        </div>
      </div>
    </div>

    <!-- <script src="/static/share/contents/membership/js/zepto.js"></script> -->
    <script src="{{ STATIC_URL }}/static/lib/zepto.min.js?v={{ version_code }}"></script>
    <script src="{{ STATIC_URL }}/static/share/contents/membership/js/zepto.fullpage.js?v={{ version_code }}"></script>
    <script>
      "use strict";
      var BOTTOM = $(".bottom");
      window.onload = function() {
        $(".wp-inner").fullpage({
          drag: true,
          start: 0,
          duration: 500,
          page: ".page",
          loop: true,
          change: function(ev) {
            console.log(ev.cur, ev.prev);
          }
        });
      };
    </script>

    {% if is_wechat %}
    <!-- <script src="/static/lib/zepto.min.js"></script> -->
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script>
      var debug = false;
      var appId = "{{ app_id }}";
      // 时间戳
      var timeStamp = "{{ time_stamp }}";
      // 随机字符串
      var nonceStr = "{{ nonce_str }}";
      var signature = "{{ signature }}";
      var link =
        "https://" +
        location.host +
        "/content/subscribe" +
        "?oid=" +
        $("input[name=open_id]").val();

      $(function() {
        wx.config({
          debug: debug, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
          appId: appId, // 必填，公众号的唯一标识
          timestamp: timeStamp, // 必填，生成签名的时间戳
          nonceStr: nonceStr, // 必填，生成签名的随机串
          signature: signature, // 必填，签名，见附录1
          jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });
        wx.ready(function() {
          wx.onMenuShareTimeline({
            title: "莱支好酒|我的私人智能酒庄", // 分享标题
            link: link, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl:
              "https://wx.style999.com/static/img/logo.png?v={{ version_code }}", // 分享图标
            success: function() {
              // 用户确认分享后执行的回调函数
            },
            cancel: function() {
              // 用户取消分享后执行的回调函数
            }
          });
          wx.onMenuShareAppMessage({
            title: "莱支好酒|我的私人智能酒庄", // 分享标题
            desc:
              "加入莱支好酒会员，拥有自己的私人智能酒庄！葡萄酒庄官方线上直营平台，基于物联网技术把葡萄酒庄搬进客厅，全程恒温冷链保持原汁原味的葡萄酒才更好喝。", // 分享描述
            link: link, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl:
              "https://wx.style999.com/static/img/logo.png?v={{ version_code }}", // 分享图标
            type: "link", // 分享类型,music、video或link，不填默认为link
            dataUrl: "", // 如果type是music或video，则要提供数据链接，默认为空
            success: function() {
              // 用户确认分享后执行的回调函数
            },
            cancel: function() {
              // 用户取消分享后执行的回调函数
            }
          });
        });
        wx.error(function(res) {
          alert("调用错误");
          alert(JSON.stringify(res));
        });

        function showDebug(k, v) {
          // 显示调试信息
          var html = "<p>";
          html += k + ":" + v;
          html += "</p>";
          $("#debug").append(html);
        }

        if (debug) {
          showDebug("appid", appId);
          showDebug("timeStamp", timeStamp);
          showDebug("nonceStr", nonceStr);
          showDebug("signature", signature);
        }
      });
    </script>
    {% endif %}
  </body>
</html>
